<!DOCTYPE HTML>
<html lang="en">
<head>
<title>EnvMult - Syntax &amp; Usage | AutoHotkey</title>
<meta name="description" content="The EnvMult command sets a variable to itself times the given value." />
<meta name="ahk:equiv-v2" content="Variables.htm#MulDiv" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>EnvMult</h1>

<p>Sets a <a href="../Variables.htm">variable</a> to itself times the given value. Synonymous with: <code>Var *= Value</code>.</p>
<p class="warning"><strong>Deprecated:</strong> This command is not recommended for use in new scripts. Use <code>Var := Var * Value</code> or <code>Var *= Value</code> instead.</p>

<pre class="Syntax"><span class="func">EnvMult</span>, Var, Value</pre>
<h2>Parameters</h2>
<dl>

  <dt>Var</dt>
  <dd><p>The name of the <a href="../Variables.htm">variable</a> upon which to operate.</p></dd>

  <dt>Value</dt>
  <dd><p>Any integer, floating point number, or <a href="../Variables.htm#Expressions">expression</a>.</p></dd>

</dl>

<h2>Remarks</h2>
<p>This command is equivalent to the shorthand style: <code>Var *= Value</code>.</p>
<p>If either <em>Var</em> or <em>Value</em> is blank or does not start with a number, it is considered to be 0 for the purpose of the calculation (except when used <em>internally</em> in an expression such as <code>Var := X *= Y</code>).</p>
<p>If either <em>Var</em> or <em>Value</em> contains a decimal point, the end result will be a floating point number in the format set by <a href="SetFormat.htm">SetFormat</a>.</p>
<h2>Related</h2>
<p><a href="EnvAdd.htm">EnvAdd</a>, <a href="EnvSub.htm">EnvSub</a>, <a href="EnvDiv.htm">EnvDiv</a>, <a href="SetFormat.htm">SetFormat</a>, <a href="../Variables.htm#Expressions">Expressions</a>, <a href="IfIs.htm">If var is [not] type</a>, <a href="SetEnv.htm">SetEnv</a>, <a href="Transform.htm">bitwise operations (Transform)</a></p>
<h2>Examples</h2>
<div class="ex" id="ExBasic">
<p><a href="#ExBasic">#1</a></p>
<pre>EnvMult, MyCount, 2 
MyCount *= 2  <em>; Equivalent to above</em></pre>
</div>

</body>
</html>
